Skip to content

Conversation

lucasweng
Copy link
Contributor

@lucasweng lucasweng commented Sep 14, 2025

Resolves #537

Summary

  • Implemented exact query key targeting to prevent unintended cascading refetches of related queries
  • Added a refetchType option to query collections for more granular control with 'all', 'active', and 'inactive' types
  • The default for refetch() is 'all', which matches the underlying TankStack queryClient.refetchQueries() default. This behavior is documented.

Test Plan

  • Tests pass locally
  • Package builds successfully

Copy link

changeset-bot bot commented Sep 14, 2025

🦋 Changeset detected

Latest commit: 41588ae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@tanstack/query-db-collection Patch
@tanstack/db-example-react-todo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Sep 14, 2025

More templates

@tanstack/angular-db

npm i https://pkg.pr.new/@tanstack/angular-db@552

@tanstack/db

npm i https://pkg.pr.new/@tanstack/db@552

@tanstack/db-ivm

npm i https://pkg.pr.new/@tanstack/db-ivm@552

@tanstack/electric-db-collection

npm i https://pkg.pr.new/@tanstack/electric-db-collection@552

@tanstack/query-db-collection

npm i https://pkg.pr.new/@tanstack/query-db-collection@552

@tanstack/react-db

npm i https://pkg.pr.new/@tanstack/react-db@552

@tanstack/rxdb-db-collection

npm i https://pkg.pr.new/@tanstack/rxdb-db-collection@552

@tanstack/solid-db

npm i https://pkg.pr.new/@tanstack/solid-db@552

@tanstack/svelte-db

npm i https://pkg.pr.new/@tanstack/svelte-db@552

@tanstack/trailbase-db-collection

npm i https://pkg.pr.new/@tanstack/trailbase-db-collection@552

@tanstack/vue-db

npm i https://pkg.pr.new/@tanstack/vue-db@552

commit: 41588ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make QueryCollection refetch() target exact query only
1 participant